#ifndef _SH_1106_H_
#define _SH_1106_H_

#include "stm32f1xx_hal.h"

#define OLED_SIZE_X 128
#define OLED_SIZE_Y 64

extern uint8_t gOledBuf[];

void SH1106_Init(void);
void SH1106_DisplayOn(void);
void SH1106_DisplayOff(void);
void SH1106_Clear(void);

// For emwin
void SH1106_WriteM8_A1(uint8_t *pDat, int len);
void SH1106_Write8_A1(uint8_t dat);
void SH1106_Write8_A0(uint8_t cmd);

void WriteDat(uint8_t dat);
void WriteCmd(uint8_t cmd);

#endif
